package com.woniuxy.aimcpserver.mapper;

import com.woniuxy.aimcpserver.entity.food;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FoodMapper {
    @Select("select * from food")
    public List<food> getAllFood();
    @Insert("insert into food values(null,#{foodName},#{foodIntro},#{price},#{kcal},#{foodImg})")
    public void addFood(food food);

    @Delete("delete from food where foodId=#{foodId}")
    void deleteFood(Integer foodId);

}
